<div>
<div class="modal-header">
    <h4 class="modal-title">为产品：{{product.name}} 设置各个级别佣金</h4>
</div>
<div class="modal-body">

<div class="container-fluid">

    <div class="" ng-repeat="attr in objs" ng-if="attr.state == '1'">
    型号：{{attr.attr_name}} , 售价：{{attr.guide_price}} , 成本：{{attr.cost_price}}
    <table class="table table-condensed table-hover table-bordered mt10">
        <thead>
            <tr>
                <th class="col-md-2 text-center">体系名称</th>
                <th class="col-md-8 text-center">佣金</th>
                <th class="col-md-2 text-center">允许分销</th>
            </tr>
        </thead>
        <tbody>
            <tr ng-repeat="obj in attr.levelarr">
                <td class="">
                    {{obj.title}}
                </td>
                <td class="text-center">
                    <div class="form-group">
                      
                      <div class="col-sm-10">
                        <p class="col-sm-2">一级:</p><input class="col-sm-4" type="text" class="form-control" ng-model="obj.profit" placeholder="一级">
                        <p class="col-sm-2">二级:</p><input class="col-sm-4" type="text" class="form-control" ng-model="obj.profit1" placeholder="二级">
                        <!-- <p class="col-sm-2">三级:</p><input class="col-sm-2" type="text" class="form-control" ng-model="obj.profit2" placeholder="三级"> -->
                      </div>
                      <div class="col-sm-2 ">
                        <button class="btn btn-info btn-sm btn-block" ng-click="save(attr.attr_id, obj)">保存</button>
                      </div>
                    </div>
                </td>
                <td class="text-center">
                    
                    <a ng-click="opt(attr.attr_id, obj)" >
                        <span 
                        ng-if="obj.state == 1"
                        class="glyphicon glyphicon-ok text-success" aria-hidden="true"></span>

                        <span
                        ng-if="obj.state == 0"
                        class="glyphicon glyphicon-remove text-danger" aria-hidden="true"></span>
                    </a>


                </td>
                
            </tr>
        </tbody>
    </table>

    </div>
        
</div>

</div>
<!-- <div class="modal-footer">
    <button class="btn btn-warning" type="button" ng-click="cancel()">返回</button>
</div> -->
</div>